﻿namespace Luka;

/// <summary>
/// 不抛出异常信息，即使报错也不会抛出异常信息
/// </summary>
[NotScanned, AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
public sealed class NoErrorAttribute : Attribute
{
    /// <summary>
    /// 自定义消息
    /// </summary>
    public string? Message { get; set; }

    /// <summary>
    /// 构造函数
    /// </summary>
    public NoErrorAttribute()
    {

    }

    /// <summary>
    /// 构造函数
    /// </summary>
    public NoErrorAttribute(string? message = "")
    {
        Message = message;
    }
}